package com.demo.goods.restapi.constants;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * created by shiwf on 2017/12/18
 **/
public class BizConstants {
    /**
     * 请求公共参数
     */
    public static final String REQUEST_PARAM_TS = "ts";
    public static final String REQUEST_PARAM_SIG = "_sig";
    public static final String REQUEST_PARAM_VERSION = "_version";
    public static final String REQUEST_PARAM_OS = "_os";
    public static final String REQUEST_PARAM_VERSION_OS = "_version_os";
    public static final String REQUEST_PARAM_MANUFACTURER = "_manufacturer";
    public static final String REQUEST_PARAM_MODEL = "_model";
    public static final String REQUEST_PARAM_SSKEY = "sskey";
    /**
     * 请求较验白名单
     */
    public static final List<String> REQUEST_WHITE_LIST = new ArrayList<>();

    public static final String CONFIG_URL = "/api/app/config";
    public static final String INDEX_URL = "/api/index/home";
    public static final String HEALTHY_HUT_URL = "/healthy-hut";
    public static final String UPGRADE_URL = "/security/upgrade";

    static {
        REQUEST_WHITE_LIST.add(CONFIG_URL);
        REQUEST_WHITE_LIST.add(HEALTHY_HUT_URL);
        REQUEST_WHITE_LIST.add("/api/course/close");
        REQUEST_WHITE_LIST.add("/api/course/paper");
    }

    public static Integer ACCESS_SIGN_FLAT = 0;
    /**
     * 请求失效时间10min
     */
    public static final long REQUEST_PARAM_EXPIRE_TIME = 10 * 60 * 1000;
    /**
     * 验证码重试次数
     */
    public static final Integer VERIFY_CODE_RETRY_TIME = 5;
    /**
     * 地区-根编码
     */
    public static final String DISTRICT_ROOT_CODE = "0";

    /**
     * 默认头像
     */
    public static String DEFAULT_USER_HEADER = "/mdt-pub/user.png";

    public static String getDefaultUserHeader() {
        return DEFAULT_USER_HEADER;
    }

    public static String LIVE_ROLE_ID = "127694881083962128";

    /**
     * 首页数据配置
     */
    public static final Map<String, String> INDEX_CONFIG_DATA_MAP = new HashMap<>();

    public static final String PULL_URL_FORMAT = "{0}/live/{1}";

}
